﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{
    /// <summary>
    /// 社团表
    /// </summary>
    [Table("D3")]
    public class Organizations:EntityBase
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public Organizations()
        {
            this.ConstructionTime = DateTime.Now;
        }
        /// <summary>
        /// 社团名称
        /// </summary>
        [Column("D001")]
        [Required]
        [StringLength(50)]
        public string? AssociationName { get; set; }

        /// <summary>
        /// 社团活动地点
        /// </summary>
        [Column("D002")]
        [Required]
        [StringLength(50)]
        public string? Address { get; set; }

        /// <summary>
        /// 社团建立时间
        /// </summary>
        [Column("D003")]
        [Required]
        public DateTime ConstructionTime { get; set; }

        /// <summary>
        /// 社团活动时间
        /// </summary>
        [Column("D004")]
        [Required]
        public DateTime ActivityTime { get; set; }

        /// <summary>
        /// 社团人数
        /// </summary>
        [Column("D005")]
        [Required]
        [MinLength(5)]
        [MaxLength(50)]
        public int Quantity { get; set; }


        /// <summary>
        /// 社团负责人
        /// </summary>
        [Column("D006")]
        [StringLength(50)]
        [Required]
        public string? Supervisor { get; set; }

        /// <summary>
        /// 社团用户
        /// </summary>
        [Required]
        public required EM_Students EM_Student { get; set; }
    }
}
